Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Commit 20a6e5f38026d7d356226d44ec7cd33555aa8d72


Parents : 0513e55
Author : Mark Qvist <bc7291552be7a58f361522990465165c>
Signature : T66BB85Valid, signed by author
Date : 2026-07-12T17:54:26+02:00

Fixed getters

Changes

1 files changed, 3 insertions(+), 3 deletions(-)


Diff

diff --git a/sbapp/ui/voice.py b/sbapp/ui/voice.py
index eb1a0cbd..bae133bc 100644
--- a/sbapp/ui/voice.py
+++ b/sbapp/ui/voice.py
@@ -209,10 +209,10 @@ class Voice():
h_str = f"{stats['hops']} hop{'' if stats['hops'] == 1 else 's'}" if stats["hops"] else "" if stats["hops"] else "Unknown"
s_str += f"\nDistance : {h_str}"
- s_str += f"\nMode : {Profiles.mode_name(stats['mode']) if stats['mode'] else 'Unknown'}"
- s_str += f"\nProfile : {Profiles.profile_name(stats['profile']) if stats['profile'] else 'Unknown'}"
+ s_str += f"\nMode : {Profiles.mode_name(stats['mode']) if stats.get('mode', None) else 'Unknown'}"
+ s_str += f"\nProfile : {Profiles.profile_name(stats['profile']) if stats.get('profile', None) else 'Unknown'}"
# s_str += f"\nRX Codec : {stats['rxcodec']}"
- s_str += f"\nCodec : {stats['txcodec']}"
+ s_str += f"\nCodec : {stats.get('txcodec', 'Unknown')}"
s_str += f"\nTraffic : TX {RNS.prettysize(txb)}"
s_str += f"\n RX {RNS.prettysize(rxb)}"


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────